<HTML><HEAD><TITLE>atomic(?Term)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Type Testing</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>atomic(?Term)</H1>
Succeeds if Term is an atom, a number, or a string.


<DL>
<DT><EM>Term</EM></DT>
<DD>Prolog term.
</DD>
</DL>
<H2>Description</H2>
   Used to test whether Term is an atomic term.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>atomic(?) is semidet
</UL>
<H3>Fail Conditions</H3>
Fails if Term is not an atom, a number or a string
<H2>Examples</H2>
<PRE>
Success:
    atomic(atom).
    atomic(1.4).
    atomic(3).
    atomic("Hello world").
    atomic([]).

Fail:
    atomic([1,3,3,6]).
    atomic(this(is,a,structure)).
    atomic(X).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/typetest/atom-1.html">atom / 1</A>, <A HREF="../../kernel/typetest/compound-1.html">compound / 1</A>, <A HREF="../../kernel/typetest/is_list-1.html">is_list / 1</A>, <A HREF="../../kernel/typetest/var-1.html">var / 1</A>
</BODY></HTML>
